-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MacOS specific compilation options #31
base: master
Are you sure you want to change the base?
Conversation
Add dylib building for MacOS
This has been working well for me, but it looks like it might be out of date now. Be great to get it into main. |
# Try to locate OpenSSL if not specified with OPENSSL_INC and OPENSSL_LIB | ||
ifeq ($(OPENSSL_INC),) | ||
OPENSSL_INC := $(shell pkg-config --cflags openssl 2>/dev/null) | ||
ifeq ($(OPENSSL_INC),) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg-config --cflags openssl
will actually be empty on an Ubuntu system (this is why CI is failing) because header files are in the standard include path. If the make
will fail if pkg-config has non-zero exit code then you can probably skip this check? A stack overflow post leads me to think ifneq ($(.SHELLSTATUS),0)
might be the right alternative here.
MACOSX_FRAMEWORKS := -framework CoreFoundation -framework Security | ||
endif | ||
|
||
all: aws_kms_pkcs11.so aws_kms_pkcs11.dylib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it makes sense to target the dylib on Linux systems (and vice-versa)? Can/should all:
be defined based on UNAME_S?
Sorry, apparently my review comments were saved as a draft rather than posted. Please check the above comments; the PR as it was was causing the CI build to fail, so it needs some tweaks. |
Here's how I got it compiling for MacOS:
Install depeencies
Install AWS SDK
We need to fix up the SDK so it builds s2n which is doesn't seem to do by default in latest versoins.
Compile AWS PKCS11
Using on MacOS
Setup OpenSSL Config